package com.zp.self.module.qualifier.config;

import com.zp.self.module.qualifier.annotation.MyService;
import com.zp.self.module.qualifier.service.SystemService;
import com.zp.self.module.qualifier.service.impl.SystemServiceOne;
import com.zp.self.module.qualifier.service.impl.SystemServiceTwo;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author By ZengPeng
 * @Description
 * @date in  2021/1/12 16:11
 * @Modified By
 */
@Component
public class SystemServiceConfig {
    @Bean
    @MyService
    public SystemService  systemServiceOne(){
        SystemServiceOne one = new SystemServiceOne();
        one.setServiceName("one");
        one.setStart(new Date());
        return  one;
    }

    @Bean
    public SystemService  systemServiceTwo(){
        SystemServiceTwo two = new SystemServiceTwo();
        two.setServiceName("two");
        two.setStart(new Date());
        return  two;
    }
}
